package cn.china.xfood.service;

import entity.Usermenu;
import entity.Userorder;
import mapper.UsermenuMapper;
import mapper.UserorderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService implements UserorderMapper {

    @Autowired
    UserorderMapper userorderMapper;

    @Override
    public int deleteByPrimaryKey(String orderNumber) {
        return userorderMapper.deleteByPrimaryKey(orderNumber);
    }

    @Override
    public int insert(Userorder record) {
        return userorderMapper.insert(record);
    }

    @Override
    public int insertSelective(Userorder record) {
        return insertSelective(record);
    }

    @Override
    public Userorder selectByPrimaryKey(String orderNumber) {
        return userorderMapper.selectByPrimaryKey(orderNumber);
    }

    @Override
    public List<Userorder> selectByUsernam(String username,int page,int limit) {
        return userorderMapper.selectByUsernam(username,page,limit);
    }

    @Override
    public int updateByPrimaryKeySelective(Userorder record) {
        return userorderMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Userorder record) {
        return userorderMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Userorder> getAll(int page, int limit) {
        return userorderMapper.getAll(page,limit);
    }

    @Override
    public int getCount() {
        return userorderMapper.getCount();
    }


}
